// @author: caoshi
// @date: 2021-06-13 19:38
package router

import (
	"academic/handler"
	"github.com/gin-contrib/sessions"
	"github.com/gin-contrib/sessions/cookie"
	"github.com/gin-gonic/gin"
)

func InitBaseRouter(Router *gin.RouterGroup) {

	store := cookie.NewStore([]byte("secret11111"))
	baseRouterGroup := Router.Group("").Use(sessions.Sessions("mysession", store))
	{
		baseRouterGroup.POST("login", handler.Login)
		baseRouterGroup.GET("captcha", handler.Captcha)
	}

}
